{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": "'e:\\\\code\\\\crawlers\\\\python3\\\\文件读写'"
     },
     "metadata": {},
     "execution_count": 1
    }
   ],
   "source": [
    "import os \n",
    "os.getcwd()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": "['01-os模块.ipynb',\n '01-文件写入.py',\n '02-文件写入中文.py',\n '03-读取英文.py',\n '04-读取中文.py',\n '05-缓存区.py',\n '06-read.py',\n '07-数字雨读取文件.py',\n '08-获取文件位置.py',\n '09-当当网.py',\n '10-对象文件读写.py',\n '11-savefile.py',\n '12.详细分类.py']"
     },
     "metadata": {},
     "execution_count": 2
    }
   ],
   "source": [
    "os.listdir()   # 获取当前目录下所有文件名称"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": "os.stat_result(st_mode=33206, st_ino=562949953526399, st_dev=1022866, st_nlink=1, st_uid=0, st_gid=0, st_size=108, st_atime=1592277535, st_mtime=1592277535, st_ctime=1592277535)"
     },
     "metadata": {},
     "execution_count": 3
    }
   ],
   "source": [
    "os.stat('01-文件写入.py')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "output_type": "stream",
     "name": "stdout",
     "text": "2020-06-16 11:18:55\n"
    }
   ],
   "source": [
    "\n",
    " import time, datetime\n",
    " timeStamp = 1592277535\n",
    " timeArray = time.localtime(timeStamp)\n",
    " otherStyleTime = time.strftime(\"%Y-%m-%d %H:%M:%S\", timeArray)\n",
    " print(otherStyleTime)   "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.6-final"
  },
  "orig_nbformat": 2,
  "kernelspec": {
   "name": "python37664bit7b7dd87d5295413e96409022fbc33620",
   "display_name": "Python 3.7.6 64-bit"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}